home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Popular Request
/
By Popular Request (Arsenal Computer)(SysOptics Distribution System).ISO
/
amiga4
/
tdclk201.lha
/
TDClick2.doc
< prev
next >
Wrap
Text File
|
1994-03-22
|
20KB
|
480 lines
TDClick Version 2.01
Copyright Mar. 1994 by Elton VonCannon
All rights reserved.
----------------------------------------------------------------------------
WHAT IS TDClick?
----------------------------------------------------------------------------
TDClick is a program written in AmigaE that allows user configurable buttons
on TrapDoor's (or any other) public screen. Its intended purpose is to
launch external programs and scripts that ultimately control some aspect of
TrapDoor (although it's not limited to this).
----------------------------------------------------------------------------
DISCLAIMER:
----------------------------------------------------------------------------
This software is provided "as-is", without warranty of any kind, either
expressed or implied. In no event will I, Elton VonCannon, be liable for
direct, indirect, incidental or consequential damages or data loss resulting
from the use or application of this software. The entire risk as to the
results and performance of this software is assumed by you, the user.
----------------------------------------------------------------------------
LICENSING REQUIREMENTS:
----------------------------------------------------------------------------
You are authorized to distribute the archive for any non-commercial purpose
as long as its contents remain unaltered. Any commercial distribution, with
the exception of Fred Fish, requires the permission of the author.
If you use this program, let me know. Public response can keep me working
on TDClick, otherwise what's the point? My address is listed at the end of
this document.
----------------------------------------------------------------------------
SYSTEM REQUIREMENTS:
----------------------------------------------------------------------------
TDClick requires ReqTools.library version 38 or greater and should run on
all systems using Kickstart 2.04 and above.
----------------------------------------------------------------------------
INSTALLATION:
----------------------------------------------------------------------------
Copy TDClick and its configuration file wherever you want. I recommend that
it be placed in the same directory as TrapDoor, but it isn't necessary.
You'll also need to edit the configutation file to conform to your system.
This is described below. You will also need to insure that TrapDoor is
configured (in TrapDoor.cfg) thusly:
PUBSCREENNAME "TrapDoor" ; Note: You can also comment this line out,
; since it is the default. DO NOT SET TO ""!
; If you use another PUBSCREENNAME, you can
; use the "-s" option to inform TDClick of
; the new name.
SCREENMODE PUBLIC ; This is required.
INTERLACE ; Not required, but you'll have room for
; more buttons.
----------------------------------------------------------------------------
STARTING TDClick:
----------------------------------------------------------------------------
Run TrapDoor first, so that its screen will be available. "Cd" to the
directory that TDClick is in, and type "run TDClick" from a shell.
(Preferrably one that's open on TrapDoor's screen.) You can start one like
this:
NewShell WINDOW "CON:0/12/572/110/TDShell/CLOSE/SCREEN TrapDoor"
NOTE: There is a script file included in the TDClick archive that'll start
everything for you. To use it, you need to have TDClick, TDClick.cfg,
TDStartup and TDShell.Startup in the current directory. First start
TrapDoor normally then type "TDStartup" and everything should be started for
you.
If you don't re-direct TDClick's output when you start it, any command that
TDClick executes will use TDClick's parent window for its input/output
unless you configure a custom window for the command. This means that in
order for you to [BREAK] a program started by TDClick, the correct window
will have to be activated first.
NOTE: TDClick's parent window will be the shell that you started TDClick
from. If you start it from a background CLI or re-direct its output to
NIL:, there will be no window. There are ways around this. Consult your
AmigaDos manuals for more information.
The stack size is unimportant for TDClick itself, since TDClick will create
and use its own stack, but the stack should be set high enough for any CLI
commands that you intend to execute with TDClick. CLI commands that are
started by TDClick will use the same path that was in effect when TDClick
was started.
When you start TDClick, you can indicate other names for TDClick's
configuration file, its public screen name, as well as the initial
coordinates for the top left corner of the window that TDClick will open.
There is also an option for launching programs asynchronously.
Typing "TDClick ?" will provide the following usage info.
Usage:
TDClick2 [-C config] [-S screen] [-X xpos] [-Y ypos] [-ZX xpos] [-ZY ypos]
[-A TRUElFALSE] [-B TRUElFALSE]
Where: -C (TDClick.cfg).Specifies the configuration filename.
-S (TrapDoor)....the name of the public screen that TDClick
will open its window on.
-X (520).........the position of the left edge of the window.
-Y (12)..........the position of the top of the window.
-ZX (520).........the position of the left edge of the window
when ZOOMED out.
-ZY (0)...........the position of the top of the window when
ZOOMED out.
-A (FALSE).......Async: A flag that if TRUE, tells TDClick to
execute all of its commands Asynchronously.
-B (FALSE).......Background: A flag that if TRUE, TDClick will not
activate its window upon startup.
NOTE: The value shown in parenthesis is the default for that parameter.
All arguments are optional and can be specified in any order.
All arguments must be seperated by at least one space.
When TDClick is run, it will attempt to open a window 120 pixels wide on the
specified (or TrapDoor's) public screen. The height of TDClick's window is
determined by the number of buttons in your configuration file. If you
specify too many buttons, TDClick will notify you.
TIP: If you want TDClick to open its window on the rightmost side of the
screen, just specify something huge like: "-X 3000". TDClick will position
its window as close to the coordinate as it can, which will be the right
side of the screen. :)
If you need more buttons than TDClick can display, you can run multiple
copies of TDClick, with each instance using a different configuration file.
The first few characters of the config file's name will appear in TDClick's
title bar. This helps identify which instance of TDClick is using a
particular configuration, if you're running multiple copies of TDClick.
----------------------------------------------------------------------------
USING TDClick:
----------------------------------------------------------------------------
After TDClick is running, you're on your own. The only pre-defined gadgets
are:
Close: A standard Intuition gadget. When clicked, this
causes TDClick to close its window and exit. Note
that if TDClick's window is the last window open
on its screen, it'll close the screen too.
Zoom: A standard Intuition gadget. This gadget will make
TDClick's window very small. This is useful for
quickly making as much of TrapDoor's windows as
visable as possible. Clicking this gadget again
will make the window full size again.
Note that you can set the default zoomed position
of the window by using the -ZX and -ZY options.
Clicking any other button causes TDClick to attempt to execute that button's
user defined CLI command. Defining the buttons is explained in the
"Configuration File" section.
----------------------------------------------------------------------------
TDClick's MENUS:
----------------------------------------------------------------------------
Open: Enables you to open a new configuration file.
Async: Toggles asyncronous execution mode on/off.
Help: Toggles help mode on/off. (Also useful for debugging.)
About: Displays some information about TDClick.
Quit: Causes TDClick to close its window and exit.
Selecting "Open" will bring up a file requestor that will enable you to
select a configuration file for TDClick to load.
Selecting "Async" will toggle asyncronous execution mode on/off. When
"Async" is enabled (indicated by a checkmark in the menu), TDClick will
execute all of the user defined commands asyncronously. This may not always
be desirable. That's why I've allowed the user to set it however he/she
wishes.
NOTE: If Async is enabled and multiple commands are specified for an
individual button, a temporary script will be created in t: and the entire
script will be executed asynchronously. This is also true of any command
string that contains the \G operator that is described below. These
temporary scripts are overwritten as necessary and deleted whenever TDClick
loads a new configuration as well as when TDClick exits. It executes
AmigaDos' delete command to perform the actual deletion.
Selecting "Help" will toggle help mode on/off. When "Help" is active
(indicated by a checkmark in the menu), no commands will be executed. If
you click a user button that normally brings up a requester, that requester
will be brought up before displaying that button's command string. This is
so that you can see exactly what effect a requester has on a command string.
Cancelling the requester will produce no help display for that command
string, since you will have cancelled the entire operation.
Selecting "About" will display some information about TDClick.
Selecting "Quit" will terminate TDClick.
----------------------------------------------------------------------------
THE CONFIGURATION FILE:
----------------------------------------------------------------------------
TDClick's configuration file contains the text for TDClick's buttons as well
as the commands that TDClick will execute whenever that button is clicked.
These rules apply to the text in the configuration file:
a. All button and command text can start at any column of a line.
ie: Leading spaces and tabs are ignored.
b. If a line contains a semicolon, the rest of the line will be
ignored... this is useful for adding comments to a config.
c. Blank lines are ignored.
d. BUTTON NAMES MUST ALWAYS BE LESS THAN 13 characters! TDClick
will warn you and stop processing a configuration file, if it
encounters a button's name that is too long.
e. Do not put "too many" buttons in the config file. The actual
number of buttons that TDClick can handle is dependent upon:
1. Whether or not you use interlace mode.
2. Your overscan settings, etc.
3. A hardcoded maximum of 80 buttons. (You will never be
able to see them all unless you have a HUGE screen.)
Note: TDClick will still display all the buttons that it
can fit on the screen. Of course, you will never see any
that are "off screen". :)
The FORMAT of the configuration file is:
button's name
command to execute
another button's name
another command to execute
yet, another button's name
yet another command to execute
etc...
Actually, it's very simple. The first line contains the text for a user
definable button. The next line contains the CLI command that you want
executed when the button is clicked. (Referred to as a button's "command
string".) The example configuration file, "TDClick.cfg" that was distributed
in TDClick2's archive should help clarify things, if you find this
description unintelligible. It's simpler to do it than it is to explain
how.
----------------------------------------------------------------------------
THE BACKSLASH OPERATORS:
----------------------------------------------------------------------------
There a few "backslash" operators that TDClick will interpret when a button
containing one is clicked. These are:
\F Brings up a file requester.
\S Brings up a string requester.
\N Command seperator. (Allows multiple commands per button.)
\W Forces a command to open its own window.
\G Opens a single global window for multiple commands.
\\ Forces TDClick to ignore a single backspace.
No backslash operator is case sensitive and any number can be contained
within a single command string.
All operators, except \\ and \n, will allow a user definable string
parameter to be specified by placing the string inside the curly braces,
"{}". If you use the curly braces to indicate a string, the first one MUST
join the operator. In other words, there can be no intervening spaces
between an operator and the first curly brace, "{".
For example: \s{Mystuff} will work, while: \s {MyStuff} will not.
THE MULTIPLE COMMAND OPERATOR: \n
You can specify multiple commands per button by seperating the commands in
the command string with "\n". If "Async" is enabled, TDClick will create a
unique script in t: and execute the entire script asyncronously.
THE WINDOW OPERATORS: \w and \g
You can force a command to open a window for its input/output by placing
"\w" in the command string. You can specify the window's position, size and
title by placing them inside curly braces like this:
\w{10/20/480/100/MyWindow}
Normally the window will close when the command that's using it terminates,
but you can force the window to remain open until you click the close gadget
by placing "/WAIT" after the window's title.
ie: List Mail:Inbound \w{10/20/500/180/List window./WAIT}
This will list "Mail:Inbound" using a custom window. The window will remain
open until you click the close gadget.
If you use \w without specifying any window parameters, a default window
will be opened for the command.
While the global window operator (\g) allows the same options as the normal
window operator, it has one major difference: it does not open a window for
each command, it opens singgle a window for multiple commands.
ie: \g{0/0/100/30}echo "hello"\necho "y'all"
This would open a single window for BOTH echo commands' messages.
NOTE: You may notice a similiarity between TDClick's windows and CON:
windows. This is because TDClick translates your window parameters into
CON: parameters before executing the command string.
THE REQUESTER OPERATORS: \s and \f
You can instruct TDClick to "pop up" a requester in order to provide
arguments for a CLI command (or even to BE the command). Any text returned
by the requester will be inserted into the command string at the location of
the \s or \f operator. Additionally, the \f and \s options themselves have
two text options. These are contained within the curly braces, "{}" and
seperated by the vertical bar, "|". The first option is the text for the
requester's title, and the second option is the default text for the
requester.
For example: "TrapTell \s{Tell TrapDoor to set:|FASTEMSI}"
This will bring up a string requester with a title of, "Tell TrapDoor to
set:" and the requester's default text will be "FASTEMSI". If you do not
change the default text, the resulting command string will be:
"TrapTell FASTEMSI".
A more useful example might be:
"rexx:rx call.rexx \s{Call who?|1:3648/101}"
When a button containing this command string is clicked, a string requester
titled "Call who?" will be displayed with the default text of "1:3648/101".
This can be very useful for infrequently called nodes or points.
(Frequently called nodes can be given their own button without a requester.)
Note that if you simply press the return key on an empty requester, it is
the same as cancelling the requester. If you do not want this to happen,
you can enter a default text consisting of a single space.
Usage of the file requester operator, "\f" is identical to the string
requester except that the default text parameter is used as a default
path/filename.
THE DOUBLE BACKSLASH OPERATOR: \\
Use this, if you want to pass a single backslash to a CLI command.
See the included TDClick.cfg for more examples.
----------------------------------------------------------------------------
ERROR MESSAGES:
----------------------------------------------------------------------------
If you didn't redirect its output at startup, TDClick should inform you, if
an error occurs while opening ReqTools.library. All other error messages
will be displayed via requesters. Hopefully the error messages will be
self-explanatory.
----------------------------------------------------------------------------
HIDDEN FEATURES:
----------------------------------------------------------------------------
TDClick now goes to extreme measures to check for a large number of errors
of all kinds (including possible programming errors). Sometimes I feel that
it does more error checking than processing. However, if you feel that
there are any bugs, please send me a DETAILED report of what you feel
TDClick is doing wrong. (Just saying "It don't work." is useless
information to me.) Here are a few things that aren't bugs:
TDClick does not allow spaces in the path or name of its config
file. This isn't a bug. It's just a brain-dead parser. :)
Sometimes TDClick will appear to ignore clicks on its buttons. This
is because TDClick is waiting for a command to finish execution.
These button clicks will be queued and executed after the previous
command finishes. If you want commands to run asynchronously, you
must put the word "run" before each command in the configuration
file or start TDClick with the -A TRUE option, or just toggle the
"Async" menu item on.
TDClick ignores the system stack and sets its own. Some stack
monitoring programs mistakenly assume this to mean that TDClick has
a stack problem.
----------------------------------------------------------------------------
IN CONCLUSION:
----------------------------------------------------------------------------
If I am presented with any enhancement suggestions, I'll consider adding
them. I welcome all comments and suggestions.
Enjoy!
Elton VonCannon, author of TDClick.
I can be reached at:
FidoNet: 1:3648/101.2
Postal Mail: Elton VonCannon
919 Macon St.
Asheboro, NC
27203
----------------------------------------------------------------------------
NOTES:
----------------------------------------------------------------------------
TrapDoor is copyrighted software by Maximilian Hantsch and Martin Laubach.
ReqTools is copyrighted software by Nico Francois.